package ioc06;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("ioc06/spring.xml");
        SomeBean someBean = (SomeBean) ac.getBean("someBean");
        someBean.doSome();

        //练习 用spring 管理time的产生
        //Calendar instance = Calendar.getInstance();
        //Date time = instance.getTime();
        Date time = (Date) ac.getBean("time");
        System.out.println(time);
    }
}
